import GameState
from Persistable import Persistable

pfile_dir = "src/pythonmud/areas/"
def get_pfile(area):
    return "%s%s.area" % (pfile_dir,area.lower())

class Area(Persistable):
    def __init__(self, area, *args, **kwargs):
        super(Area, self).__init__(get_pfile(area), *args, **kwargs)
        self.persistant = {
            "name": "a default zone name",
            "id": None,
            "rooms": []
        }

        self.instance_id = None
        self.players = []

class Room(Persistable):
    def __init__(self, *args, **kwargs):
        super(Room, self).__init__(*args, **kwargs)
        self.persistant = {
            "name": "a default room name",
            "description": "a default room descriptions",
            "exits": [],
            "id": None,
            "zone_id": None
        }

        self.instance_id = None
        self.players = []

class Exit(Persistable):
    def __init__(self, *args, **kwargs):
        super(Exit, self).__init__(*args, **kwargs)
        self.persistant = {
            "name": "a default exit name",
            "zone_id": None
        }

        self.instance_id = None
